import { Body, Controller, Post } from '@nestjs/common';
import { EmailService } from './email.service';
import { SendEmailDto } from './dto/send-email.dto';
import { Public } from '../decorators/public.decorator';

@Controller()
export class EmailController {
  constructor(private readonly emailService: EmailService) {



  }
  @Public()
  @Post('sendEmail')
  sendEmail(@Body() email: SendEmailDto) {
    return this.emailService.sendMail(email)
  }
}
